Home
last modified time | relevance | path

Searched hist:c8e68b43 (Results 1 – 1 of 1) sorted by relevance

/qemu/
H A Dqemu-io-cmds.cc8e68b43 Tue Sep 10 07:03:06 GMT 2019 Kevin Wolf <kwolf@redhat.com> qemu-io: Don't leak pattern file in error path

qemu_io_alloc_from_file() needs to close the pattern file even if some
error occurred.

Setting f = NULL in the success path and checking it for NULL in the
error path isn't strictly necessary at this point, but let's do it
anyway in case someone later adds a 'goto error' after closing the file.

Coverity: CID 1405303
Fixes: 4d731510d34f280ed45a6de621d016f67a49ea48
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>